#ifndef TC_CHEKPOINTS_H
#define TC_CHEKPOINTS_H

#ifdef JMBC_INSIDE

typedef struct
{
	int magic;
	unsigned int vertices;
} TCCheckPointsHeader;
typedef struct
{
	float coord[3];
} TCCheckPointsVertex;

#define TC_CHECKPOINTS_GROUP_VERTICES 0

typedef struct
{
	unsigned int groups[1];
} TCCheckPoints;

#endif


// Context

void
tcCheckPointsCreateContext(void);

// Generation / Deletion

void
tcGenCheckPointses(unsigned int n, unsigned int *checkpointses);

void
tcDeleteCheckPointses(unsigned int n, unsigned int *checkpointses);

// Load / Unload

void
tcCheckPointsLoad(unsigned int id, unsigned int filepath);

void
tcCheckPointsUnload(unsigned int id);

void
tcCheckPointssUnload(unsigned int n, unsigned int *checkpointses);

// Operation

void
tcCheckPointsCompile(unsigned int id, unsigned int filepath);

void
tcCheckPointsDecompile(unsigned int id, unsigned int filepath);

unsigned int
tcCheckPointsVertices(unsigned int id);

float *
tcCheckPointsVertex(unsigned int id, unsigned int vertex);

// Disk I/O

void
tcCheckPointsSave(unsigned int id, unsigned int filepath);

#endif
